1. Technical Field
The present invention relates generally to switching in a packet switched network and, more specifically, to systems and methods for looking up destination addresses in a switch of a packet-switched network.
2. Background Art
At the heart of most networks are switches interconnected via a communications medium. For example, Ethernet is a commonly used local area network scheme in which multiple stations are connected to a single shared serial data path. These stations communicate with a switch located between the shared data path and the stations connected to that path. The switch controls the communication of data packets on the network.
Networks are frequently organized into sub-networks, called subnets. Within a single subnet, packets of information may be directed to their destination devices using a layer 2 Media Access Control (MAC) address that identifies the attached Ethernet devices. When a switch receives a packet with a familiar destination MAC address, it forwards the packet to the output port on the switch that is associated with the MAC address.
Packets transmitted between layer 2 subnets do so using the destination device""s IP (Internet Protocol) layer 3 address. More particularly, a transmitting device sending a packet to a destination device outside of the transmitting device""s subnet first determines, using the IP layer 3 address, the layer 2 MAC address of a gateway router that bridges the subnets. The gateway router, upon receiving the packet, performs address translation, which involves stripping the MAC destination address of the router and inserting a new MAC destination address that corresponds to the MAC address of the destination device in the destination subnet. The router determines the MAC address to substitute based on the IP address.
Current IP switching techniques are based on version four of the IP (xe2x80x9cIPv4xe2x80x9d) protocol. More recently, a newer version of the IP protocol, version six (xe2x80x9cIPv6xe2x80x9d), has been proposed. One of the differences in IPv6 relative to IPv4 is that IPv6 uses longer address fields, thus allowing networks to have a larger number of uniquely addressable devices.
One difficulty caused by the longer address fields in IPv6 is that certain registers in layer 3 switches that were designed for IPv4 are not large enough to handle the larger IPv6 addresses. For example, a layer 3 switch implementing IPv4 may use an internal address table that assigns 32 bits for each address compared to the 128 bits required by IPv6 addresses. This is not a problem as long as the layer 3 switch transmits packets within a subnet because, in this situation, the switch only uses the MAC destination addresses. However, when transmitting the packets between different subnets, the switch uses the 128-bit IPv6 address, which may be incompatible with switches designed around the IPv4 protocol. Modifying the layer 3 switch to be able to handle the IPv6 addresses can require substantial design changes, which may undesirably add to the cost of the switch.
Thus, there is a need in the art to improve layer 3 switches to be able to handle the larger addresses used in IPv6 while minimizing changes to the layer 3 switch.
Advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the appended claims.
According to one aspect of the present invention, a multiport network device comprises a receiver and a transmitter. An internal rules checker is coupled to an output of the receiver. The internal rules checker generates a forwarding descriptor, based on header information of packets in the network, that identifies transmit ports for the packets. The internal rules checker includes a rules queue configured to receive the header information for the packet and a first address lookup table configured to store associations between destination addresses and transmit ports, the rules queue and the first address table being implemented within a single integrated circuit. The internal rules checker generates the forwarding descriptor for the packet by looking up the destination address of the packet in the first address table when the destination address is an address associated with a first protocol and the internal rules checker generates the forwarding descriptor for the packet by looking up the destination address for the packet in a second address table, implemented externally to the integrated circuit, when the destination address is an address associated with a second protocol.
A method consistent with the present invention is a method of processing packets in a network device. The method comprises receiving a packet at one of a plurality of receive ports in the network device, the packet having header information that includes at least an intended destination address for the packet. The method includes determining, by an internal rules checker, a forwarding descriptor for the packet that identifies transmit ports to output the packet from the network device. The forwarding descriptor is determined for the packet by looking up the destination address of the packet in a first address lookup table when the destination address is an address associated with a first protocol, the first address lookup table being implemented in an integrated circuit. Additionally, the method includes determining, by the internal rules checker, the forwarding descriptor for the packet by looking up the destination address for the packet in a second address table, implemented externally to the integrated circuit, when the destination address is an address associated with a second protocol.